package com.onetoall.yjt;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;

/**
 * Created by user on 2016/12/2.
 */

public class MyDataHelper extends SQLiteOpenHelper {
    private static final String DB_NAME = "person.db";
    private static int DB_VERSION=1;
    public MyDataHelper(Context context) {
        super(context, DB_NAME, null, DB_VERSION);
    }

    @Override
    public void onCreate(SQLiteDatabase db) {
            String sql = "create table  if not exists users(_id integer primary key autoincrement,name varchar(20),number varchar(20));";
            db.execSQL(sql);
    }

    @Override
    public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {

    }
}
